define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
		function get_data_brandList(result) {
			if(HTTP_ISLOGIC) {
				result = '{"success": true,"msg": "","result": { "brand": ['+
				'{"id": "001","name": "世达","logo": "img/upload/pro-img01.jpg","goods_cat": [{"cat_name": "分类_001"}, {"cat_name": "分类_002"}], "apply_time": "2016/01/01 09:00:00","agree_time": "2016/01/05 09:00:00"},'+
				'{"id": "002","name": "博士","logo": "img/upload/pro-img01.jpg","goods_cat": [{"cat_name": "分类_003"},{"cat_name": "分类_004"}],"apply_time": "2015/01/01 09:00:00","agree_time": "2015/01/05 09:00:00"}'+
				']},"session": "7311da98bd0f18eb15a96bcb263f4153"}';
				return JSON.parse(result);
			} else {
				return result;
			}
		}
	
	
		//返回信息
		return {
			brand_list: function(callback) {
				Http.post({
					method: 'member.brandapply.getlist',
					session: '',
					pagelimit:10,
					nPage: 1,
					show_count: 5
				}, function(result) {
					if(callback)
					callback(get_data_brandList(result).result);

				}, function(e) {

				}, function() {

				})
			}
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Productmanager_brand_agent", factory);
});